<template>
	<view>
		<uni-popup ref="popup" >
			  <view class="popupBox" >
				 <image class="gift" src="/static/newsImg/gift.png" mode="widthFix"></image>
				 <view class="p_title">恭喜您获得</view>
				 <view class="p_subtitle">{{data.equityCardName}}</view>
				 <view class="p_content">白名单抢购资格</view>
				 <view class="p_but" @click="jumpCardDetails">立即抢购</view>
			   </view>
			   <view class="close" @click="close" >
			    	<image class="imgBox" src="/static/blindbox/cuo_w.png" mode=""></image>
			  </view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		name:"rush-to-buy",
		data() {
			return {
				id:null,
				data:{}
			};
		},
		methods:{
			async open(){
			  if (this.$queue.getData('token') != undefined) {
					var res = await this.$api.getWhiteQualification()
					if(res.result != ''){
					   this.$refs.popup.open()
					   this.data = res.result
					}
			  }

			},
			close() {
				this.$refs.popup.close()
			},
			jumpCardDetails(){
				this.close()
				// uni.navigateTo({
				// 	url: '/pages/pay/order-details?id='+this.data.equityCardId
				// })
				window.location.href =  '/pages/pay/order-details?id='+this.data.equityCardId
			}
		}
	}
</script>

<style scoped>
	.uni-popup{
		z-index: 999;
	}
	.popupBox{
		width: 590rpx;
		height: 568rpx;
		background: url('/static/newsImg/bg-color.jpg') no-repeat;
		background-size: 100% 100%;
		border-radius: 40rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.gift{
		width: 512rpx;
		height: 242rpx;
		margin-top: -108rpx;
	}
	.p_title{
		font-size: 44rpx;
		line-height: 62rpx;
		color: #222222;
		margin-top: 42rpx;
	}
	.p_subtitle{
		font-size: 36rpx;
		line-height: 50rpx;
		background: linear-gradient(90deg, #0B87F2 0%, #6752EA 100%);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
		background-clip: text;
		text-fill-color: transparent;
		margin-top: 34rpx;
	}
	.p_content{
		margin-top: 14rpx;
		font-size: 32rpx;
		color: #222222;
        line-height: 44rpx;
	}
	.p_but{
		margin-top: 60rpx;
		width: 300rpx;
		height: 80rpx;
		background: linear-gradient(90deg, #0B87F2 0%, #6752EA 100%);
		border-radius: 200rpx;
		text-align: center;
		line-height: 80rpx;
		color: #FFFFFF;
        font-size: 32rpx;
	}
	.close{
		
		width: 84rpx;
		height: 84rpx;
		margin: 0 auto;
		margin-top: 60rpx;
	}
</style>